//
//  JWNewsWebView.m
//  JWMovie
//
//  Created by Jorn.Wu on 15/7/28.
//  Copyright (c) 2015年 Jorn.Wu. All rights reserved.
//

#import "JWNewsWebView.h"

@implementation JWNewsWebView


- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
        NSURLRequest __block *request;
        dispatch_async(queue, ^{
            NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://news.mtime.com/"]];
            request = [NSURLRequest requestWithURL:url];
        });
        
        dispatch_queue_t mainQueue = dispatch_get_main_queue();
        dispatch_async(mainQueue, ^{
            [self loadRequest:request];
        });
 
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
